<template>
  <div>
    <h2>Count组件</h2>
    <p>我count的值是:{{ count }}</p>
    <p>电影列表的总共有{{ movieList.length }}个电影</p>
    <button @click="increment({ n: 3 })">累加N</button>
    <p>电影长度在3-6的列表如下</p>
    <p v-for="item in movieName3_6" :key="item.tvId">{{ item.name }}</p>
  </div>
</template>

<script>
import { mapGetters, mapMutations, mapState } from 'vuex'
export default {
    name:"Count",
    computed:{
      // 一旦使用模块化开启命名空间后，辅助函数前面就需要写上当前模块的模块化名称
      // ...mapState(["count","movieList"]),
      // ...mapGetters(["movieName3_6"]),
      ...mapState("count",["count"]),
      ...mapState("movie",["movieList"]),
      ...mapGetters("movie",["movieName3_6"])
    },
    methods: {
      // ...mapMutations(["increment"])
      ...mapMutations("count",["increment"])
    },
};
</script>

<style scoped>

</style>